package modelo;

import org.hibernate.HibernateException;
import org.hibernate.Session;

import entities.MozoEntity;
import entities.RemitoEntity;
import hbt.AbstractHibernateManager;

public class RemitoDao extends AbstractHibernateManager {

	public void save(RemitoEntity re){
		Session s= null;
		try {
			s=getNewSession();
			s.beginTransaction();
			s.persist(re);
			s.flush();
			s.getTransaction().commit();
			System.out.println("[remito PERSISTED ON TABLE remitos & itemsRemitos]::OK");
		} catch (HibernateException e) {
			e.printStackTrace();
		} finally {
			closeSession(s);
		}
	}
	
}
